package BoostedTest::RDBO::ProjectsHasComponent;

use strict;

use base qw(BoostedTest::RDBO::DB::Object);

__PACKAGE__->meta->setup(
    table   => 'projects_has_components',

    columns => [
        component_id => { type => 'integer', not_null => 1 },
        project_id   => { type => 'integer', not_null => 1 },
    ],

    primary_key_columns => [ 'component_id', 'project_id' ],
    foreign_keys =>
    [
        project =>
        {
          class       => 'BoostedTest::RDBO::Project',
          key_columns => { project_id => 'id' },
        },

        component =>
        {
          class       => 'BoostedTest::RDBO::Component',
          key_columns => { component_id => 'id' },
        },
   ],
);

1;

